Setting variable to value of form [drupal 6]

Posted by N Schleder on Stack Overflow See other posts from Stack Overflow or by N Schleder
Published on 2013-07-02T23:02:33Z Indexed on 2013/07/02 23:05 UTC
Read the original article Hit count: 156

Filed under:
|

I have this form

$form['title'] = array(
    '#type' => 'textfield', 
    '#title' => t('Title of Notice'), 
    '#description' => t('Use_underscores_as_spaces'),
    '#size' => 30,
    // '#required' => TRUE
);

and I want whatever the user types in to be the value of $test

I've tried

$test = $form['title'];

which gives me $test = array

also I've tried

$test = current($form['title']);

which gives me $test = textfield

$form['values']['title'] doesn't work

dont know what else to try

© Stack Overflow or respective owner

Related posts about drupal-6

Related posts about drupal-forms